function queryCars()
{


}
////angular.module('myApp', []).controller('namesCtrl', function($scope,$http) {
//    $http.get("all").then(function(response){
//        $scope.names=response.data;
//    });
//})
//;
angular.module('myApp', [ 'ngRoute' ])
//    .config(function($routeProvider, $httpProvider) {
//        $routeProvider.when('/', {
//            templateUrl : 'index.html',
//            controller : 'home',
//            controllerAs: 'controller'
//        }).otherwise('a.html');
//    })
    .controller('home', function($scope,$http) {
        $http.get("all").then(function(response){
            $scope.names=response.data;
        });
    })
     .controller('usercars', function($scope,$http) {
        $http.get("carsbyuser?UserId=1").then(function(response){
            $scope.names=response.data;
        });
    })
    .controller('navigation', function() {});

